Have a watch callback return 0 or 1 depending upon whether it would like to
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 15 Nov 2005 18:08:11 +0000 (19:08 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 15 Nov 2005 18:08:11 +0000 (19:08 +0100)
commit5d0f388f77e52674f41d87c1e50ba7578a292ce6
tree59dc8f676721f5cdb2b73241435b11eb85d22130
parent9773f5386e655c7c6fb42fffc1b948d8c1595342
Have a watch callback return 0 or 1 depending upon whether it would like to
continue to receive watches.  This means that it is not necessary to probe
around in the xswatch internals to unregister a watch.

Tidy up the hotplug watch handling, moving the nested function out to a
separate place (I don't think that this was a problem in the end, but it was
making me nervous as I was debugging the recent race condition, and I find it
clearer out of the class in any case.  Pass an integer code representing
hotplug status, once it has been parsed from the store, as there are now a few
different places we can detect failure, and it's cleaner to pass a code from
those places.

Small tidy up to XendDomain, removing the unused releaseDomain field.
tools/python/xen/xend/XendDomain.py
tools/python/xen/xend/server/DevController.py
tools/python/xen/xend/xenstore/xswatch.py